package com.hitqz.robot.netty.service;

import com.hitqz.robot.api.business.model.vo.form.FormConfigModalVo;
import com.hitqz.robot.api.common.entity.*;
import com.hitqz.robot.api.dispatch.protocol.dto.*;
import com.hitqz.robot.common.core.util.R;

import java.util.LinkedList;
import java.util.List;

/**
 * @author xupkun
 * @date 2024/6/13
 */
public interface Send2ServerService {


    void send2ServerData(Integer cmd, String data);

    /**
     * 一般返回结果
     * @param sn
     * @param result
     */
    void commonReply(Integer sn, R result);

    void syncRobotInfo(Integer sn, RobotDto robotDto);

    void syncRobotMapInfo(Integer sn, RobotMapDto robotMapDto);

    void syncRobotMapPosInfo(Integer sn, RobotMapPosDto robotMapPosDto);

    /**
     * 同步区域信息
     * @param sn
     * @param robotMapAreaDto
     */
    void syncRobotMapAreaInfo(Integer sn, RobotMapAreaDto robotMapAreaDto);

    /**
     * 申请路径
     * @param robot
     * @param robotMapPos
     * @return
     */
    List<RobotMapPosDto> applyPath(Robot robot, LinkedList<RobotMapPos> robotMapPos);

    boolean syncTickets(Robot robot , Tickets tickets,  List<TicketsTask> tasks);

    boolean syncSysWarning(Robot robot, RobotWarningDto sysWarning);

    boolean syncTasks(Robot robot, FormConfigModalVo vo);

    boolean sendLog(String clientId, String randomId, String message);


    boolean uploadLogFile(String clientId,String fileName);

    boolean uploadBatteryLevel(String clientId, BatteryDataInfo dataInfo);

}
